<template>
    <div>
        <div class="foot_bx"></div>
        <div class="foot_gd">
            <div class="foot_gd2" @click="tohome">
            <img src="https://img.alicdn.com/imgextra/i2/O1CN01OStgh21aWOP69RsTZ_!!6000000003337-2-tps-63-63.png" alt="">
            <p>首页</p>
            </div>
            <div class="foot_gd2" @click="toCart">
                <img :src="colorIMg1" alt="">
                <p>购物车</p>
            </div>
            <div class="foot_gd2" @click="toOnec">
                <img :src="colorIMg2" alt="">
                <p>我的淘宝</p>
            </div>
        </div>
    </div>

</template>

<script>
export default {
    data(){
        return{

        }
    },
    props: ["colorIMg1", "colorIMg2"],
    methods: {
        toCart() {
            this.$router.push("/CartPage").catch(err=>{})
        },
        tohome(){
            this.$router.push("/").catch(err=>{})
        }, 
        toOnec(){
            this.$router.push("/register").catch(err=>{})
        }
    },
}
</script>

<style scoped>
.foot_bx{
    width: 100%;
    height: 1rem;
}
.foot_gd {
    width: 100%;
    height: 1rem;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;    }
    
.foot_gd div {
    width: 25%;
    height: .74rem;
    margin: .08rem 0;
}
    
.foot_gd .foot_gd2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
    
.foot_gd .foot_gd2 img {
    width: .4rem;
    height: .4rem;
}
    
.foot_gd .foot_gd2 p {
    font-size: .24rem;
    color: #666;
    margin-top: .1rem;
}
</style>